<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>APR (Airport Rhapsody): cam.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">APR (Airport Rhapsody)
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Implementation based on monitors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('cam_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">cam.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Problem name: Airport rhapsody.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="prob_data_struct_8h_source.html">probDataStruct.h</a>&quot;</code><br/>
</div>
<p><a href="cam_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acb3f2c741e4cfce60cb46a66d2e2aaec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#acb3f2c741e4cfce60cb46a66d2e2aaec">camInit</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c)</td></tr>
<tr class="memdesc:acb3f2c741e4cfce60cb46a66d2e2aaec"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> initialization.  <a href="#acb3f2c741e4cfce60cb46a66d2e2aaec">More...</a><br/></td></tr>
<tr class="separator:acb3f2c741e4cfce60cb46a66d2e2aaec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a13d7539d1641a0c6ed23217152f599"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#a5a13d7539d1641a0c6ed23217152f599">camSearch</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c, unsigned int val)</td></tr>
<tr class="memdesc:a5a13d7539d1641a0c6ed23217152f599"><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for a value in the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>.  <a href="#a5a13d7539d1641a0c6ed23217152f599">More...</a><br/></td></tr>
<tr class="separator:a5a13d7539d1641a0c6ed23217152f599"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03f23194099969c0fae1882dc5fca624"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#a03f23194099969c0fae1882dc5fca624">camIn</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c, unsigned int val)</td></tr>
<tr class="memdesc:a03f23194099969c0fae1882dc5fca624"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insertion of a value into the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>.  <a href="#a03f23194099969c0fae1882dc5fca624">More...</a><br/></td></tr>
<tr class="separator:a03f23194099969c0fae1882dc5fca624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab13d81261d30390f600f551e6cdbbbec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#ab13d81261d30390f600f551e6cdbbbec">camOut</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c, unsigned int val)</td></tr>
<tr class="memdesc:ab13d81261d30390f600f551e6cdbbbec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieval of a value from the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>.  <a href="#ab13d81261d30390f600f551e6cdbbbec">More...</a><br/></td></tr>
<tr class="separator:ab13d81261d30390f600f551e6cdbbbec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02050e9390d9f9a969d366a19b33f81d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#a02050e9390d9f9a969d366a19b33f81d">camFull</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c)</td></tr>
<tr class="memdesc:a02050e9390d9f9a969d366a19b33f81d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> full.  <a href="#a02050e9390d9f9a969d366a19b33f81d">More...</a><br/></td></tr>
<tr class="separator:a02050e9390d9f9a969d366a19b33f81d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af57e0d1e0a497960a62820d816ab9e40"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cam_8h.html#af57e0d1e0a497960a62820d816ab9e40">camEmpty</a> (<a class="el" href="struct_c_a_m.html">CAM</a> *p_c)</td></tr>
<tr class="memdesc:af57e0d1e0a497960a62820d816ab9e40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> empty.  <a href="#af57e0d1e0a497960a62820d816ab9e40">More...</a><br/></td></tr>
<tr class="separator:af57e0d1e0a497960a62820d816ab9e40"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Problem name: Airport rhapsody. </p>
<p>(interface file)</p>
<p>Concept: António Rui Borges</p>
<p><a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> management.</p>
<p>The following operations are defined: </p>
<ul>
<li>initialization </li>
<li>search for a value </li>
<li>insertion of a value </li>
<li>retrieval of a value </li>
<li>test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> full </li>
<li>test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> empty.</li>
</ul>
<dl class="section author"><dt>Author</dt><dd>António Rui Borges - November 2013 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af57e0d1e0a497960a62820d816ab9e40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool camEmpty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> empty. </p>
<pre class="fragment">   The function fails if a null pointer is passed as a parameter.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code>, if the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is empty </dd>
<dd>
<code>false</code>, otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a02050e9390d9f9a969d366a19b33f81d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool camFull </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test for <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> full. </p>
<pre class="fragment">   The function fails if a null pointer is passed as a parameter.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code>, if the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is full </dd>
<dd>
<code>false</code>, otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a03f23194099969c0fae1882dc5fca624"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void camIn </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Insertion of a value into the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>. </p>
<pre class="fragment">   The key is in this case the value itself to be stored.
   The function fails if a null pointer is passed as a parameter or the CAM is full.
   Nothing is stored if the function fails.
   If an equal value is already stored in the CAM, the new value is stored in FIFO order.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored </td></tr>
    <tr><td class="paramname">val</td><td>value to be stored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acb3f2c741e4cfce60cb46a66d2e2aaec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void camInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> initialization. </p>
<pre class="fragment">   CAM will be empty after it.
   The function fails if a null pointer is passed as a parameter.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab13d81261d30390f600f551e6cdbbbec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void camOut </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieval of a value from the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>. </p>
<pre class="fragment">   The key is in this case the value itself to be retrieved.
   The function fails if a null pointer is passed as a parameter or the CAM is empty or no value is presently
   stored there.
   Nothing is retrieved if the function fails.
   If more than one value is stored in the CAM, the extracted value is retrieved in FIFO order.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored </td></tr>
    <tr><td class="paramname">val</td><td>value to be retrieved </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5a13d7539d1641a0c6ed23217152f599"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool camSearch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_a_m.html">CAM</a> *&#160;</td>
          <td class="paramname"><em>p_c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Search for a value in the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a>. </p>
<pre class="fragment">   The key is in this case the value itself.
   The function fails if a null pointer is passed as a parameter.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p_c</td><td>pointer to the location where the <a class="el" href="struct_c_a_m.html" title="Definition of cam of bags data type.">CAM</a> is stored </td></tr>
    <tr><td class="paramname">val</td><td>value to be searched</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code>, if the value is found </dd>
<dd>
<code>false</code>, otherwise </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="cam_8h.html">cam.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
